Motor rehabilitation based on ai visual recognition